import { initPage } from '../../utils/util.js'
initPage({
	/**
	 * 页面的初始数据
	 */
	data: {
		goodsList: [
			{
				id: '74',
				type: '2',
				type_name: 'group-buying',
				name: '欧啦自助火锅',
				saled_count: '21',
				current_price: '0.01',
				price: '92.00',
				thumbnail:
					'https://file.duduapp.net/2/2018/04/19/pDH6N4xx4p622psaWfFK62NYCKKbeJTC.jpg@428w_320h_1e_1c?x-oss-process=image/resize,h_796,limit_0/crop,y_0,x_134,w_796,h_796',
				is_vip_price: '0',
				vip_price: '0.00',
				distance: {
					number: '617.1',
					unit: 'km'
				},
				purchased_user: [],
				currentPriceFormat: {
					i: 0,
					f: '01'
				},
				vipPriceFormat: {
					i: 0,
					f: '00'
				}
			},
			{
				id: '766',
				type: '2',
				type_name: 'group-buying',
				name: '团购金额测试',
				saled_count: '8',
				current_price: '19.90',
				price: '34.88',
				thumbnail:
					'https://file.duduapp.net/2/2018/07/09/82d52B53BMmayzKb7k8bWTZGj8zHJAMa.jpg?x-oss-process=image/resize,h_252,limit_0/crop,y_0,x_0,w_336,h_252',
				is_vip_price: '1',
				vip_price: '0.01',
				distance: {
					number: '574.6',
					unit: 'km'
				},
				purchased_user: [],
				currentPriceFormat: {
					i: 19,
					f: '90'
				},
				vipPriceFormat: {
					i: 0,
					f: '01'
				}
			},
			{
				id: '660',
				type: '2',
				type_name: 'group-buying',
				name: '精品古装个人写真一套',
				saled_count: '1',
				current_price: '299.00',
				price: '899.00',
				thumbnail:
					'https://file.duduapp.net/10603/2018/05/30/AEQzDi4i68bJWw4Ccc6AhtNTfXyKzjWP.jpg?x-oss-process=image/resize,h_893,limit_0/crop,y_97,x_0,w_796,h_796',
				is_vip_price: '0',
				vip_price: '0.00',
				distance: {
					number: '119.4',
					unit: 'km'
				},
				purchased_user: [],
				currentPriceFormat: {
					i: 299,
					f: '00'
				},
				vipPriceFormat: {
					i: 0,
					f: '00'
				}
			}
		]
	},

	/**
	 * 生命周期函数--监听页面加载
	 */
	onLoad: function(options) {
		this.setData({
			hasLoaded: true
		})
	},

	/**
	 * 生命周期函数--监听页面初次渲染完成
	 */
	onReady: function() {},

	/**
	 * 生命周期函数--监听页面显示
	 */
	onShow: function() {},

	/**
	 * 生命周期函数--监听页面隐藏
	 */
	onHide: function() {},

	/**
	 * 生命周期函数--监听页面卸载
	 */
	onUnload: function() {},

	/**
	 * 页面相关事件处理函数--监听用户下拉动作
	 */
	onPullDownRefresh: function() {},

	/**
	 * 页面上拉触底事件的处理函数
	 */
	onReachBottom: function() {},

	/**
	 * 用户点击右上角分享
	 */
	onShareAppMessage: function() {}
})
